package com.sdutcm.Service.ServiceImpl;
import com.sdutcm.Domain.Lend;
import com.sdutcm.Mapper.LendMapper;
import com.sdutcm.Service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/*
 *@Author Yan
 *@Create 2019-08-20 19:18
 */
@Service
public class LendServiceImpl implements lendService {

    @Autowired
    private LendMapper lendMapper;
    // 添加借出
    @Override
    public void lendAdd(Lend lend) throws Exception {
        lendMapper.lendAdd(lend);
    }

    // 查看当前借出
    @Override
    public List<Lend> lendList() throws Exception {
        return lendMapper.lendList();
    }

    // 修改以归还
    @Override
    public Lend listEdit(Integer id) throws Exception {
        return lendMapper.listEdit(id);
    }

    @Override
    public void lendEditTime(Lend lend) throws Exception {
        lendMapper.lendEditTime(lend);
    }

    @Override
    public List<Lend> lendListHis() throws Exception {
        return lendMapper.lendListHis();
    }


}
